package chu.dejian.ui.unused;

import android.os.Bundle;
import android.widget.ListView;

import chu.dejian.adapter.AttentionAdapter;
import com.sam.blemodule.R;
import com.sam.ui.base.fragment.BaseFragment;
import com.sam.widget.headerBar.BaseHeaderView;
import com.sam.widget.headerBar.LeftImgTitleRightImgBar;

public class EmergencyContactsFragment extends BaseFragment {
	private static EmergencyContactsFragment instance;
	public synchronized static EmergencyContactsFragment getInstance(){
		if(instance == null){
			instance = new EmergencyContactsFragment();
		}
		return instance;
	}

	private LeftImgTitleRightImgBar header;
	private ListView contactListView;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.fragment_emergency_contacts);
	}

	public void findView() {
		header = (LeftImgTitleRightImgBar) findViewById(R.id.header);
		contactListView = (ListView) findViewById(R.id.contact_list);
	}

	public void initView() {
		header.setOnHeaderClickListener(onHeaderClickListener);
		contactListView.setAdapter(new AttentionAdapter(getActivity(),R.layout.row_attention_vertical_with_arrow,null,true));
	}

	private BaseHeaderView.OnHeaderClickListener onHeaderClickListener = new BaseHeaderView.OnHeaderClickListener() {
		@Override
		public void onHeaderLeftClicked() {
			backToPreviewFragment();
		}

		@Override
		public void onHeaderRightClicked() {
		}
	};
	
}
